<div class="datatable">
  <rd-widget>
    <rd-widget-body classes="no-padding">

      <div class="toolBar">
        <div class="toolBarTitle">
          <i class="fa" ng-class="$ctrl.titleIcon" aria-hidden="true" style="margin-right: 2px;"></i> {{ $ctrl.titleText }}
        </div>
      </div>

      <div class="actionBar" ng-if="$ctrl.showSnapshotAction">
        <button type="button" class="btn btn-sm btn-primary" ng-click="$ctrl.snapshotAction()">
          <i class="fa fa-sync space-right" aria-hidden="true"></i>Refresh
        </button>
      </div>

      <div class="searchBar">
        <i class="fa fa-search searchIcon" aria-hidden="true"></i>
        <input
          type="text"
          class="searchInput"
          ng-model="$ctrl.state.textFilter"
          ng-change="$ctrl.onTextFilterChange()"
          placeholder="Search by name, group, tag, status, URL..." auto-focus>
      </div>

      <div class="blocklist">
        <endpoint-item
          ng-repeat="endpoint in $ctrl.state.filteredEndpoints"
          model="endpoint"
          on-select="$ctrl.dashboardAction"
          on-edit="$ctrl.editAction"
          is-admin="$ctrl.isAdmin"
        ></endpoint-item>
        <div ng-if="!$ctrl.endpoints" class="text-center text-muted">
          Loading...
        </div>
        <div ng-if="!$ctrl.state.filteredEndpoints.length" class="text-center text-muted">
          No endpoint available.
        </div>
      </div>

    </rd-widget-body>
  </rd-widget>
</div>
